<template>
  <div id="app">
    <div v-if="showNavbar">
      <NavBar />
    </div>
    <router-view/>
    </div>
  <Bottom/>
</template>

<script>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import NavBar from './components/NavBar.vue';
import Bottom from './components/Bottom.vue'
export default {
  name: 'App',
  components: {
    NavBar,
    Bottom
  },
  setup() {
    const route = useRoute();
    const showNavbar = computed(() => {
      return route.path !== '/login' && route.path !== '/register' && route.path!=='/' && route.path!=='/before-course-intro'&& route.path!=='/before-ai-search'&& route.path!=='/before-knowledge'&&route.path!=='/beforehelp';
    });
    return { showNavbar };
  }
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
